home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qpaintdevicemetrics.h.z / qpaintdevicemetrics.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  1.6 KB  |  52 lines

  1. /****************************************************************************
  2. ** $Id: qpaintdevicemetrics.h,v 2.4 1998/07/03 00:09:36 hanord Exp $
  3. **
  4. ** Definition of QPaintDeviceMetrics class
  5. **
  6. ** Created : 941109
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QPAINTDEVICEMETRICS_H
  25. #define QPAINTDEVICEMETRICS_H
  26.  
  27. #ifndef QT_H
  28. #include "qwindowdefs.h"
  29. #include "qpaintdevice.h"
  30. #include "qpaintdevicedefs.h"
  31. #endif // QT_H
  32.  
  33.  
  34. class QPaintDeviceMetrics            // paint device metrics
  35. {
  36. public:
  37.     QPaintDeviceMetrics( const QPaintDevice * );
  38.  
  39.     int      width()    const    { return (int)pdev->metric(PDM_WIDTH); }
  40.     int      height()    const    { return (int)pdev->metric(PDM_HEIGHT); }
  41.     int      widthMM()    const    { return (int)pdev->metric(PDM_WIDTHMM); }
  42.     int      heightMM()    const    { return (int)pdev->metric(PDM_HEIGHTMM); }
  43.     int      numColors()    const    { return (int)pdev->metric(PDM_NUMCOLORS); }
  44.     int      depth()    const    { return (int)pdev->metric(PDM_DEPTH); }
  45.  
  46. private:
  47.     QPaintDevice *pdev;
  48. };
  49.  
  50.  
  51. #endif // QPAINTDEVICEMETRICS_H
  52.